package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HospitalSubscribeHospitalInfoMapper;
import com.ruoyi.system.domain.HospitalSubscribeHospitalInfo;
import com.ruoyi.system.service.IHospitalSubscribeHospitalInfoService;

/**
 * 医院信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-26
 */
@Service
public class HospitalSubscribeHospitalInfoServiceImpl implements IHospitalSubscribeHospitalInfoService 
{
    @Autowired
    private HospitalSubscribeHospitalInfoMapper hospitalSubscribeHospitalInfoMapper;

    /**
     * 查询医院信息
     * 
     * @param id 医院信息主键
     * @return 医院信息
     */
    @Override
    public HospitalSubscribeHospitalInfo selectHospitalSubscribeHospitalInfoById(Long id)
    {
        return hospitalSubscribeHospitalInfoMapper.selectHospitalSubscribeHospitalInfoById(id);
    }

    /**
     * 查询医院信息列表
     * 
     * @param hospitalSubscribeHospitalInfo 医院信息
     * @return 医院信息
     */
    @Override
    public List<HospitalSubscribeHospitalInfo> selectHospitalSubscribeHospitalInfoList(HospitalSubscribeHospitalInfo hospitalSubscribeHospitalInfo)
    {
        return hospitalSubscribeHospitalInfoMapper.selectHospitalSubscribeHospitalInfoList(hospitalSubscribeHospitalInfo);
    }

    /**
     * 新增医院信息
     * 
     * @param hospitalSubscribeHospitalInfo 医院信息
     * @return 结果
     */
    @Override
    public int insertHospitalSubscribeHospitalInfo(HospitalSubscribeHospitalInfo hospitalSubscribeHospitalInfo)
    {
        hospitalSubscribeHospitalInfo.setCreateTime(DateUtils.getNowDate());
        return hospitalSubscribeHospitalInfoMapper.insertHospitalSubscribeHospitalInfo(hospitalSubscribeHospitalInfo);
    }

    /**
     * 修改医院信息
     * 
     * @param hospitalSubscribeHospitalInfo 医院信息
     * @return 结果
     */
    @Override
    public int updateHospitalSubscribeHospitalInfo(HospitalSubscribeHospitalInfo hospitalSubscribeHospitalInfo)
    {
        hospitalSubscribeHospitalInfo.setUpdateTime(DateUtils.getNowDate());
        return hospitalSubscribeHospitalInfoMapper.updateHospitalSubscribeHospitalInfo(hospitalSubscribeHospitalInfo);
    }

    /**
     * 批量删除医院信息
     * 
     * @param ids 需要删除的医院信息主键
     * @return 结果
     */
    @Override
    public int deleteHospitalSubscribeHospitalInfoByIds(Long[] ids)
    {
        return hospitalSubscribeHospitalInfoMapper.deleteHospitalSubscribeHospitalInfoByIds(ids);
    }

    /**
     * 删除医院信息信息
     * 
     * @param id 医院信息主键
     * @return 结果
     */
    @Override
    public int deleteHospitalSubscribeHospitalInfoById(Long id)
    {
        return hospitalSubscribeHospitalInfoMapper.deleteHospitalSubscribeHospitalInfoById(id);
    }
}
